package cn.matezk.cloud.model;

import cn.hutool.core.util.ObjectUtil;
import lombok.Data;

import java.util.List;

@Data
public class User {
    private String unionId;
    private String appId;
    private String userId;
    private String openId;
    private Boolean isSub;
    private Boolean wechatNotifyEnable;
    private List<String> perms;

    public String getUnionId() {
        return ObjectUtil.isEmpty(unionId) ? userId : unionId;
    }
}
